<template>
	<view>
		<button type="primary" @click="toPay">点我支付</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			toPay () {
        uni.requestPayment({
          timeStamp: '1575973593',
          nonceStr: '6eadqT8Cu3lOMJl4',
          package: 'prepay_id=wx10174652687910a9bf64e50d1208840200',
          signType: 'MD5',
          paySign: 'ED760AC492C79496070526557611A24C',
          success (res) {
            uni.showToast({
              icon: 'success'
            })
            console.log('支付成功')
            console.log(res)
          },
          fail (res) { }
        })
      }
		}
	}
</script>

<style>

</style>
